import { Select as AntSelect, SelectProps } from 'antd'

import { CaretDownOutlined } from '@ant-design/icons'

const Select = (props: SelectProps) => {
  return (
    <AntSelect
      placeholder="请选择"
      showSearch
      optionFilterProp="label"
      allowClear
      suffixIcon={
        <CaretDownOutlined
          style={{ color: 'var(--xdrsec-switch-background-color)' }}
        />
      }
      getPopupContainer={triggerNode => triggerNode.parentNode}
      {...props}
    />
  )
}

export default Select
